<select multiple="multiple" class="inputList fieldType{$id} {if $complexField}complexField{/if}" name="{if $complexField}{$complexField}[{$id}][{$complexStep}][]{else}{$id}[]{/if}" style="width:315px" >
	<option value=""  onclick="$(this).attr('selected', '')" >[[Select]] [[{$caption|escape:"html"}]]</option>
	{foreach from=$list_values item=list_value}
		<option  value='{$list_value.id}' {foreach from=$value item=value_id}{if $list_value.id == $value_id}selected="selected"{/if}{/foreach} >{tr mode="raw"}{$list_value.caption|escape:"html"}{/tr}</option>
	{/foreach}
</select><br/>
<small>[[Use the "Control" key to choose two or more options]].</small>
<script type="text/javascript">
{literal}
function limitShowAvailableCounter{/literal}{$id}{literal}(limit){
	selCount = $(".fieldType{/literal}{$id}{literal} option:selected").size();
	$('#count-available-{/literal}{$id}{literal}').empty().html(limit - selCount+' {/literal}[[Available]]{literal}');
}
$(document).ready(function() {
	var limit{/literal}{$id}{literal} = {/literal}{if !empty($choiceLimit)}{$choiceLimit}{else}null{/if}{literal};
	if (limit{/literal}{$id}{literal}) {
		$(".fieldType{/literal}{$id}{literal}").bind("change", function(){
			limitSelectionsForTreeAndListTypes("{/literal}{$id}{literal}",limit{/literal}{$id}{literal});
		});
	}
});
{/literal}
</script>